const Koa = require('koa')
const app = new Koa()
const bodyParser = require('koa-bodyparser')
app.use(bodyParser())
const cors = require('koa-cors')
app.use(cors())
// const Router = require('koa-router')
// const router = new Router()

// router.get('/login', async ctx => {
//   ctx.body = 'hello world index.page'
// })

// app.use(router.routes(), router.allowedMethods())
const createUser = require('./routes/login')
// app.use(async ctx => {
//   ctx.body = 'hello worlda'
// })
app.use(createUser.routes(), createUser.allowedMethods)

app.listen(3000, () => {
  console.log('server at running 3000....')
})
